﻿@model AzureGames.Domain.Models.GameUser
@{
    ViewBag.Title = "ProfileTiles";
}
<script type="text/javascript">
    $(document).ready(function () {
        $(".openDialog").live("click", function (e) {
            e.preventDefault();

            $("<div></div>")
                .addClass("dialog")
                .addClass("framed")
                .addClass("article")
                .attr("id", $(this)
                .attr("data-dialog-id"))
                .appendTo("body")
                .dialog({
                    close: function () { $(this).remove(); },
                    modal: true,
                    height: 250,
                    width: 400,
                    left: 0

                })
                .load(this.href);
            $('.ui-dialog-titlebar').hide();
        });

        $(".close").live("click", function (e) {
            e.preventDefault();
            $(this).closest(".dialog").dialog("close");
        });
    });
   
</script>
<div id="result" style="display:none;"></div>
<div id="games">
    <div id="games-list-contents">
               <div class="wrapper">
                <div class="game"> 
                    <div class="content">
                        <div class="header">
                            <div class="overlay"></div>
                            <div class="data-name">Avatar</div>
                            <div class="glass"></div>
                        </div>
                        <div class="actions">
                         <img class="avatar" src="@Url.Action("GetResource", new { resourceID = Model.AvatarImage, contentType = "image/png" })" alt="Avatar Picture" title="Photo" />
                          <div class="nav">
                          @Html.ActionLink("Upload", "Avatar", "User",null,new {
                            @class = "openDialog",
                            data_dialog_id = "avatarDialog",
                            })

                         </div>                               
                        </div>
                        <div class="footer"><span class="game-summary">To Change Avatar Click Upload</span></div>
                       </div>
                </div>
            </div>
</div>
</div>



